<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>


<script>

  // console.log(isFinite(123))
  // console.log(isNaN('123'))
  // console.log(Number.isFinite(123))
  // console.log(Number.isNaN('123'))




  function myAjax({url, method = 'GET'}) {
    // let url = options.url
    // let method = options.method || 'GET'
    // const {url, method = 'GET'} = options
    // console.log(url, method)
  }
  // myAjax()
  myAjax({
    url: '/path',
    // method: 'GET'
  })



  // 变量解构、赋值
  /*
  let person = {
    name: '张三',
    age: 34,
    sayHi() {
      alert('hi')
    },
    color: 'red',
    // n: undefined
    n: null
  }
  const { sayHi: sayhah, name, n = 100 } = person
  console.log(name)
  console.log(n)
  // sayHi()
  sayhah()*/




  // let arr = [1, 23, 999, [77]]
  // const [a, ,b, [c]] = arr
  // Rest ...
  // const [a, c, ...b] = arr
  // console.log(a)
  // console.log(b)
  // console.log(c)
</script>
</body>
</html>